/* use strcmp() */

#include <iostream>
#include <cstring>
#include <cstdio>

bool password();

int main()
{
    if (password())
        std::cout << "Allowed" << std::endl;
    else std::cout << "Access is denied" << std::endl;

    return 0;
}

bool password()          // return true or false
{
    char pass[80];

    std::cout << "Enter password: ";
    gets(pass);

    if (strcmp(pass, "password")){   // if pass = password - 0(false), pass > password > 0, pass < password < 0
        std::cout << "Password is incorrect" << std::endl;
    return false;
   }

   return true;
}
